# Contributor: Robin Candau <robincandau@protonmail.com>
# Maintainer: Robin Candau <robincandau@protonmail.com>
pkgname=nfoview
pkgver=2.0.1
pkgrel=0
pkgdesc="Simple NFO file viewer in GTK+ 3"
url="https://otsaloma.io/nfoview/"
arch="noarch"
license="GPL-3.0-or-later"
depends="gobject-introspection hicolor-icon-theme pango python3 py3-gobject3 font-cascadia-code-nerd"
checkdepends="py3-pytest xvfb-run"
makedepends="py3-build py3-installer py3-setuptools py3-wheel gtk4.0-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/otsaloma/nfoview/archive/$pkgver.tar.gz"
subpackages="$pkgname-doc"

build() {
	make PREFIX=/usr build
}

check() {
	xvfb-run pytest -v "$pkgname"
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" install
	install -Dm 644 AUTHORS.md "$pkgdir/usr/share/doc/$pkgname/AUTHORS.md"
	install -Dm 644 NEWS.md "$pkgdir/usr/share/doc/$pkgname/NEWS.md"
	install -Dm 644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}
sha512sums="
109cbe090ad0da1b4cbcd28418b2a8d2213972578419545d7b5523e7cf8683ca851d20d5c56f363f23f28f0274dcead128c864ce44fb551d88f229615a8d4bef  nfoview-2.0.1.tar.gz
"
